package cn.tedu.baidashi.vo;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class RegisterVO implements Serializable {
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1\\d{10}$",message = "请输入正确的手机号")
    private String username;

    @NotBlank(message = "昵称不能为空")
    @Pattern(regexp = "^.{2,20}$",message = "昵称是2~20个字符")
    private String nickname;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^\\w{6,20}$",message = "密码必须是6~20个字符")
    private String password;

    @NotBlank(message = "确认密码不能为空")
    private String confirm;


}
